package com.mender.lovebible.aiservice;


import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,//手动装配
        chatModel = "openAiChatModel", //指定模型
        streamingChatModel = "openAiStreamingChatModel", //指定流式模型
//        chatMemory = "chatMemory",//配置会话记忆对象
        chatMemoryProvider = "chatMemoryProvider",//配置会话记忆提供者
        contentRetriever = "contentRetriever"//配置向量数据库检索对象
)
public interface ConsultantService {

//    系统提示词
    @SystemMessage(fromResource = "system.txt")
//    @SystemMessage("你是一个专业的ai恋爱宝典,请根据用户的问题给出暖心的回答")
    public Flux<String> chat(@MemoryId String memoryId, @UserMessage String message);
}